<!DOCTYPE html>
<html lang="en">
<head>
<title>WebView4Delphi: uWVCoreWebView2Args: Class TCoreWebView2NavigationCompletedEventArgs</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="generator" content="PasDoc 0.16.0-snapshot">
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<link rel="StyleSheet" type="text/css" href="pasdoc.css">
</head>
<body>
<span id="TCoreWebView2NavigationCompletedEventArgs"></span><h1 class="cio">Class TCoreWebView2NavigationCompletedEventArgs</h1>
<div class="sections">
<div class="one_section"><a class="section" href="#PasDoc-Description">Description</a></div><div class="one_section"><a class="section" href="#PasDoc-Hierarchy">Hierarchy</a></div><div class="one_section"><a class="section" href="#PasDoc-Fields">Fields</a></div><div class="one_section"><a class="section" href="#PasDoc-Methods">Methods</a></div><div class="one_section"><a class="section" href="#PasDoc-Properties">Properties</a></div></div>
<span id="PasDoc-Description"></span><h2 class="unit">Unit</h2>
<p class="unitlink">
<a href="uWVCoreWebView2Args.html">uWVCoreWebView2Args</a></p>
<h2 class="declaration">Declaration</h2>
<p class="declaration">
<code>type TCoreWebView2NavigationCompletedEventArgs = class(TObject)</code></p>
<h2 class="description">Description</h2>
<p>
 Event args for the NavigationCompleted event. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs article.)</p>
<span id="PasDoc-Hierarchy"></span><h2 class="hierarchy">Hierarchy</h2>
<ul class="hierarchy"><li class="ancestor">TObject</li>
<li class="thisitem">TCoreWebView2NavigationCompletedEventArgs</li></ul><h2 class="overview">Overview</h2>
<span id="PasDoc-Fields"></span><h3 class="summary">Fields</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#FBaseIntf">FBaseIntf</a></strong>: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code><strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#FBaseIntf2">FBaseIntf2</a></strong>: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs2.html">ICoreWebView2NavigationCompletedEventArgs2</a>;</code></td>
</tr>
</table>
<span id="PasDoc-Methods"></span><h3 class="summary">Methods</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetInitialized">GetInitialized</a></strong>: boolean;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetIsSuccess">GetIsSuccess</a></strong>: boolean;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetWebErrorStatus">GetWebErrorStatus</a></strong>: <a href="uWVTypes.html#TWVWebErrorStatus">TWVWebErrorStatus</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetNavigationID">GetNavigationID</a></strong>: uint64;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>function <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetHttpStatusCode">GetHttpStatusCode</a></strong>: integer;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><code>procedure <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#InitializeFields">InitializeFields</a></strong>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>constructor <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#Create-ICoreWebView2NavigationCompletedEventArgs-">Create</a></strong>(const aArgs: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>); reintroduce;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>destructor <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#Destroy">Destroy</a></strong>; override;</code></td>
</tr>
</table>
<span id="PasDoc-Properties"></span><h3 class="summary">Properties</h3>
<table class="summary wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#Initialized">Initialized</a></strong>    : boolean                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetInitialized">GetInitialized</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#BaseIntf">BaseIntf</a></strong>       : <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>  read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#FBaseIntf">FBaseIntf</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#IsSuccess">IsSuccess</a></strong>      : boolean                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetIsSuccess">GetIsSuccess</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#WebErrorStatus">WebErrorStatus</a></strong> : <a href="uWVTypes.html#TWVWebErrorStatus">TWVWebErrorStatus</a>                          read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetWebErrorStatus">GetWebErrorStatus</a>;</code></td>
</tr>
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#NavigationID">NavigationID</a></strong>   : uint64                                     read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetNavigationID">GetNavigationID</a>;</code></td>
</tr>
<tr class="list2">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><code>property <strong><a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#HttpStatusCode">HttpStatusCode</a></strong> : integer                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetHttpStatusCode">GetHttpStatusCode</a>;</code></td>
</tr>
</table>
<h2 class="description">Description</h2>
<h3 class="detail">Fields</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="FBaseIntf"></span><code><strong>FBaseIntf</strong>: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="FBaseIntf2"></span><code><strong>FBaseIntf2</strong>: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs2.html">ICoreWebView2NavigationCompletedEventArgs2</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<h3 class="detail">Methods</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetInitialized"></span><code>function <strong>GetInitialized</strong>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetIsSuccess"></span><code>function <strong>GetIsSuccess</strong>: boolean;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetWebErrorStatus"></span><code>function <strong>GetWebErrorStatus</strong>: <a href="uWVTypes.html#TWVWebErrorStatus">TWVWebErrorStatus</a>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetNavigationID"></span><code>function <strong>GetNavigationID</strong>: uint64;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="GetHttpStatusCode"></span><code>function <strong>GetHttpStatusCode</strong>: integer;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="protected.gif" alt="Protected" title="Protected"></a></td>
<td class="itemcode"><span id="InitializeFields"></span><code>procedure <strong>InitializeFields</strong>;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Create-ICoreWebView2NavigationCompletedEventArgs-"></span><code>constructor <strong>Create</strong>(const aArgs: <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>); reintroduce;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Destroy"></span><code>destructor <strong>Destroy</strong>; override;</code></td>
</tr>
<tr><td colspan="2">
<p class="nodescription">This item has no description.</p></td></tr>
</table>
<h3 class="detail">Properties</h3>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="Initialized"></span><code>property <strong>Initialized</strong>    : boolean                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetInitialized">GetInitialized</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Returns true when the interface implemented by this class is fully initialized. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="BaseIntf"></span><code>property <strong>BaseIntf</strong>       : <a href="uWVTypeLibrary.ICoreWebView2NavigationCompletedEventArgs.html">ICoreWebView2NavigationCompletedEventArgs</a>  read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#FBaseIntf">FBaseIntf</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 Returns the interface implemented by this class. </p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="IsSuccess"></span><code>property <strong>IsSuccess</strong>      : boolean                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetIsSuccess">GetIsSuccess</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>


<p>`TRUE` when the navigation is successful. `FALSE` for a navigation that ended up in an error page (failures due to no network, DNS lookup failure, HTTP server responds with 4xx), but may also be `FALSE` for additional scenarios such as `window.stop()` run on navigated page.

<p>Note that WebView2 will report the navigation as 'unsuccessful' if the load for the navigation did not reach the expected completion for any reason. Such reasons include potentially catastrophic issues such network and certificate issues, but can also be the result of intended actions such as the app canceling a navigation or navigating away before the original navigation completed. Applications should not just rely on this flag, but also consider the reported WebErrorStatus to determine whether the failure is indeed catastrophic in their context.

<p>WebErrorStatuses that may indicate a non-catastrophic failure include:

<p>- COREWEBVIEW2_WEB_ERROR_STATUS_OPERATION_CANCELED

<p>- COREWEBVIEW2_WEB_ERROR_STATUS_VALID_AUTHENTICATION_CREDENTIALS_REQUIRED

<p>- COREWEBVIEW2_WEB_ERROR_STATUS_VALID_PROXY_AUTHENTICATION_REQUIRED

<p></p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_issuccess">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_issuccess</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="WebErrorStatus"></span><code>property <strong>WebErrorStatus</strong> : <a href="uWVTypes.html#TWVWebErrorStatus">TWVWebErrorStatus</a>                          read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetWebErrorStatus">GetWebErrorStatus</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The error code if the navigation failed. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_weberrorstatus">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_weberrorstatus</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="NavigationID"></span><code>property <strong>NavigationID</strong>   : uint64                                     read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetNavigationID">GetNavigationID</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>
 The ID of the navigation. </p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_navigationid">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs#get_navigationid</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs article.)</p>
</td></tr>
</table>
<table class="detail wide_list">
<tr class="list">
<td class="visibility"><a href="legend.html"><img  src="public.gif" alt="Public" title="Public"></a></td>
<td class="itemcode"><span id="HttpStatusCode"></span><code>property <strong>HttpStatusCode</strong> : integer                                    read <a href="uWVCoreWebView2Args.TCoreWebView2NavigationCompletedEventArgs.html#GetHttpStatusCode">GetHttpStatusCode</a>;</code></td>
</tr>
<tr><td colspan="2">
<p>


<p>The HTTP status code of the navigation if it involved an HTTP request. For instance, this will usually be 200 if the request was successful, 404 if a page was not found, etc. See <a href="https://developer.mozilla.org/docs/Web/HTTP/Status">https://developer.mozilla.org/docs/Web/HTTP/Status</a> for a list of common status codes.

<p>The `HttpStatusCode` property will be 0 in the following cases:

<p>* The navigation did not involve an HTTP request. For instance, if it was a navigation to a <a href="file://">file://</a> URL, or if it was a same-document navigation.

<p>* The navigation failed before a response was received. For instance, if the hostname was not found, or if there was a network error.

<p>In those cases, you can get more information from the `IsSuccess` and `WebErrorStatus` properties.

<p>If the navigation receives a successful HTTP response, but the navigated page calls `window.stop()` before it finishes loading, then `HttpStatusCode` may contain a success code like 200, but `IsSuccess` will be FALSE and `WebErrorStatus` will be `COREWEBVIEW2_WEB_ERROR_STATUS_CONNECTION_ABORTED`.

<p>Since WebView2 handles HTTP continuations and redirects automatically, it is unlikely for `HttpStatusCode` to ever be in the 1xx or 3xx ranges.

<p></p>
<p>


<p>&lt;see href=&quot;<a href="https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs2#get_httpstatuscode">https://learn.microsoft.com/en-us/microsoft-edge/webview2/reference/win32/icorewebview2navigationcompletedeventargs2#get_httpstatuscode</a>&quot;&gt;See the ICoreWebView2NavigationCompletedEventArgs2 article.)</p>
</td></tr>
</table>
<hr><span class="appinfo"><em>Generated by <a href="https://pasdoc.github.io/">PasDoc 0.16.0-snapshot</a>. </em>
</span>
</body></html>
